public class Student extends People {
    public Teacher name;
    public Course b;
    public boolean choose;

    public Student(int code, String name, char sex, Teacher t, Course c, boolean choose) {
        super(code, name, sex);
        this.name = t;
        this.b = c;
        this.choose = choose;
    }

    public boolean getAll() {
        return choose;
    }

    public String toString() {
        return "学生编号:" + getCode() + "学生姓名:" + getName() + "性别:" + getSex() + "授课老师：" + name.name + this.b;
    }
}
